const mongoose = require('mongoose')

const {Schema,model} = mongoose

const userSchema = new Schema({
  __v: {
    type: Number,
    select: false
  },
  name: {
    type: String,
    required: true
  },
  password: {
    type: String,
    required: true,
    select: false
  }, //查询是不会出现密码字段
  gender:{
    type:String,
    enmu: ['male', 'female'],
    defalut: 'male'
  }
})
// 集合名称 ，schema
module.exports = model('User', userSchema)
